package com.lichuang.springboot.study.lichuangspringbootproject.parent.failure;

import org.springframework.boot.diagnostics.AbstractFailureAnalyzer;
import org.springframework.boot.diagnostics.FailureAnalysis;

public class CustomerFailureAnalazer extends AbstractFailureAnalyzer<NullPointerException> {
    @Override
    protected FailureAnalysis analyze(Throwable rootFailure, NullPointerException cause) {
        FailureAnalysis failureAnalysis=new FailureAnalysis("出现Null指针错误",
                "请检查对象是否有NUll的情况",rootFailure);

        return failureAnalysis;
    }
}
